import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqRobIslandMiniPlayerHelper } from "./SeqRobIslandMiniPlayerHelper";
import { SIslandPos } from "./SIslandPos";
import { SEntityId } from "../Public/SEntityId";
type int = number;
//class SPlaceInfo
    
    export  class SPlaceInfo extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SPlaceInfo();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.placeId);
            this.pos.__write(arg1);
            arg1.writeInt(this.grassTotal);
            arg1.writeInt(this.grassRemain);
            arg1.writeInt(this.exploitSpeed);
            arg1.writeInt(this.grassCount);
            arg1.writeInt(this.occupySeconds);
            this.guildId.__write(arg1);
            arg1.writeString(this.guildName);
            this.attackGuildId.__write(arg1);
            arg1.writeString(this.attackGuildName);
            SeqRobIslandMiniPlayerHelper.write(arg1, this.players);
            SeqRobIslandMiniPlayerHelper.write(arg1, this.attackPlayers);
            arg1.writeBool(this.isFighting);
            arg1.writeInt(this.fightStartSeconds);
            arg1.writeInt(this.protectSeconds);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.placeId = arg1.readInt();
            this.pos = new SIslandPos();
            this.pos.__read(arg1);
            this.grassTotal = arg1.readInt();
            this.grassRemain = arg1.readInt();
            this.exploitSpeed = arg1.readInt();
            this.grassCount = arg1.readInt();
            this.occupySeconds = arg1.readInt();
            this.guildId = new SEntityId();
            this.guildId.__read(arg1);
            this.guildName = arg1.readString();
            this.attackGuildId = new SEntityId();
            this.attackGuildId.__read(arg1);
            this.attackGuildName = arg1.readString();
            this.players = SeqRobIslandMiniPlayerHelper.read(arg1);
            this.attackPlayers = SeqRobIslandMiniPlayerHelper.read(arg1);
            this.isFighting = arg1.readBool();
            this.fightStartSeconds = arg1.readInt();
            this.protectSeconds = arg1.readInt();
            return;
        }

        public /* const */_type: int=955;

        public /* var */placeId: int;

        public /* var */pos: SIslandPos;

        public /* var */grassTotal: int;

        public /* var */grassRemain: int;

        public /* var */exploitSpeed: int;

        public /* var */grassCount: int;

        public /* var */occupySeconds: int;

        public /* var */guildId: SEntityId;

        public /* var */guildName: string;

        public /* var */attackGuildId: SEntityId;

        public /* var */attackGuildName: string;

        public /* var */players: Array<any>;

        public /* var */attackPlayers: Array<any>;

        public /* var */isFighting: Boolean;

        public /* var */fightStartSeconds: int;

        public /* var */protectSeconds: int;

        public static /* var */_regist: SPlaceInfo;
    }

            SPlaceInfo._regist = new SPlaceInfo(true);
        